<%@page import="java.io.PrintWriter"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fm" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'base.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
  </head>

  
  <body><!-- <%=basePath%>inventory/all.do -->
<form id="pagerForm" method="post" action="inventory/outRecordActivity.do">
	<input type="hidden" name="totalCount" value="${requestScope.condition.totalCount}">
	<input type="hidden" name="numPerPage" value="${requestScope.condition.numPerPage}" />
	<input type="hidden" name="totalPage" value="${requestScope.condition.totalPage}" />
	<input type="hidden" name="pageNum" value="${requestScope.condition.pageNum}" />
	<input type="hidden" name="name" value="${requestScope.condition.activity_name}" />
	<input type="hidden" name="code" value="${requestScope.condition.code}" />
	
	
</form>


<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="inventory/outRecordActivity.do" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					活动名字：<input type="text" name="activity_name" />
				</td>
				<td>
					活动编号：<input type="text" name="code" />
				</td>
				</tr>
		</table>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
		           <li><a class="edit" href="inventory/getRecordActivity.do?Code={code}" target="dialog"  title="请选择在库商品出库 "><span>出库</span></a></li>
		           <li class="line">line</li>
		</ul>
	</div>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
			<c:if test="${requestScope.condition.numPerPage == '100'}">
				<option value="100" selected>100</option>
				<option value="150" >150</option>
				<option value="200" >200</option>
			</c:if>
			<c:if test="${requestScope.condition.numPerPage == '150'}">
				<option value="100" >100</option>
				<option value="150" selected>150</option>
				<option value="200" >200</option>
			</c:if>
			<c:if test="${requestScope.condition.numPerPage == '200'}">
				<option value="100" >100</option>
				<option value="150" >150</option>
				<option value="200" selected>200</option>
			</c:if>
			</select>
			<span>条，共${requestScope.condition.totalCount}条</span>
		</div>
	<div class="pagination" targetType="navTab" totalCount="${requestScope.condition.totalCount}" numPerPage="${requestScope.condition.numPerPage}" pageNumShown="${requestScope.condition.totalPage}" currentPage="${requestScope.condition.pageNum}"></div>
     </div>
     <!--  对于活动进行查询展示-->
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="3%" align="center">序号</th>
				<th width="20%">活动编号</th>
				<th width="15%">活动名字</th>
				<th width="5%">开始时间</th>
				<th width="10%" align="center">结束时间</th>
				<th width="5%" align="center">操作员</th>
				<th width="15%" align="center">活动</th>
				
			</tr>
		</thead>
		<tbody>
		<c:if test="${!empty requestScope.activitys }">
			<c:forEach items="${requestScope.activitys }" var="role" varStatus="status">
			<tr target="code" rel="${role.id }">
				<td>${status.index + 1}</td>
				<td>${role.code}</td>
				<td>${role.activity_name }</td>
				<td>${role.start_time }</td>
				<td>${role.end_time }</td>
				<td>${role.operator }</td>
				<td>
				<c:if test="${role.type =='0'}">促销活动</c:if>
				<c:if test="${role.type =='1'}">其他</c:if></td>
				
			</tr>
			</c:forEach>
		</c:if>
		</tbody>
	</table>
</div> 

  </body>
</html>
